import { axios } from '@/utils/request'

/**
 * 查询仓库
 *
 * @author Eric
 * @date 2021-03-29 21:05:26
 */
export function storehousePage (parameter) {
  return axios({
    url: '/storehouse/page',
    method: 'get',
    params: parameter
  })
}

/**
 * 仓库列表
 *
 * @author Eric
 * @date 2021-03-29 21:05:26
 */
export function storehouseList (parameter) {
  return axios({
    url: '/storehouse/list',
    method: 'get',
    params: parameter
  })
}

/**
 * 添加仓库
 *
 * @author Eric
 * @date 2021-03-29 21:05:26
 */
export function storehouseAdd (parameter) {
  return axios({
    url: '/storehouse/add',
    method: 'post',
    data: parameter
  })
}

/**
 * 编辑仓库
 *
 * @author Eric
 * @date 2021-03-29 21:05:26
 */
export function storehouseEdit (parameter) {
  return axios({
    url: '/storehouse/edit',
    method: 'post',
    data: parameter
  })
}

/**
 * 删除仓库
 *
 * @author Eric
 * @date 2021-03-29 21:05:26
 */
export function storehouseDelete (parameter) {
  return axios({
    url: '/storehouse/delete',
    method: 'post',
    data: parameter
  })
}

/**
 * 仓库树图
 *
 * @author Eric
 * @date 2021-03-29 21:05:26
 */
export function storehouseTree () {
  return axios({
    url: '/storehouse/tree',
    method: 'get'
  })
}
